/*******************************************************************************
 *
 * Pentaho Big Data
 *
 * Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
 *
 *******************************************************************************
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 ******************************************************************************/

package org.pentaho.runtime.test.impl;

import org.pentaho.runtime.test.RuntimeTestStatus;
import org.pentaho.runtime.test.module.RuntimeTestModuleResults;

import java.util.List;

/**
 * Created by bryan on 8/18/15.
 */
public class RuntimeTestStatusImpl implements RuntimeTestStatus {
  private final List<RuntimeTestModuleResults> runtimeTestModuleResults;
  private final int testsDone;
  private final int testsRunning;
  private final int testsOutstanding;
  private final boolean done;

  public RuntimeTestStatusImpl( List<RuntimeTestModuleResults> runtimeTestModuleResults, int testsDone,
                                int testsRunning, int testsOutstanding, boolean done ) {
    this.runtimeTestModuleResults = runtimeTestModuleResults;
    this.testsDone = testsDone;
    this.testsRunning = testsRunning;
    this.testsOutstanding = testsOutstanding;
    this.done = done;
  }

  @Override public List<RuntimeTestModuleResults> getModuleResults() {
    return runtimeTestModuleResults;
  }

  @Override public int getTestsDone() {
    return testsDone;
  }

  @Override public int getTestsRunning() {
    return testsRunning;
  }

  @Override public int getTestsOutstanding() {
    return testsOutstanding;
  }

  @Override public boolean isDone() {
    return done;
  }

  //OperatorWrap isn't helpful for autogenerated methods
  //CHECKSTYLE:OperatorWrap:OFF
  @Override public String toString() {
    return "RuntimeTestStatusImpl{" +
      "runtimeTestModuleResults=" + runtimeTestModuleResults +
      ", testsDone=" + testsDone +
      ", testsRunning=" + testsRunning +
      ", testsOutstanding=" + testsOutstanding +
      ", done=" + done +
      '}';
  }
  //CHECKSTYLE:OperatorWrap:ON
}
